#ifndef C_VM_H
#define C_VM_H

#ifdef __cplusplus
extern "C" {
#endif

#include <stdint.h>

#include "../common_defs.h"


// 释放虚拟机资源
void vm_free();
intptr_t eval();
intptr_t vm_running_env_init();

// 获取虚拟机的各指针的初始位置
intptr_t* vm_get_text_start();
char* vm_get_data_start();
intptr_t* vm_get_stack_start();
intptr_t* vm_get_symbols_start();
char* vm_get_data();
void vm_set_data(char* data);

#ifdef __cplusplus
}
#endif

#endif /* C_VM_H */ 